package com.zhejiangzhengyuan.municipal_common.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zhejiangzhengyuan.municipal_common.entity.Subject;
import com.zhejiangzhengyuan.municipal_common.entity.dto.SubjectDto;
import com.zhejiangzhengyuan.municipal_common.entity.vo.SubjectVo;
import com.zhejiangzhengyuan.municipal_common.response.ResponseVo;

import java.util.List;

/**
 * 权限模块中的认证主体表，与业务系统中的用户数据一一对应，存储用户的用户名、密码、权限关系起点。单独存储是为了将权限和业务解耦 服务类
 *
 * @author linju
 * @since 2019-11-22
 */
public interface SubjectService extends IService<Subject> {
    ResponseVo findById(Long id);

    ResponseVo findByName(String name);

    Subject login(String name, String password);

    void freeze(Integer id);

    Page<SubjectVo> selectAllUserInfo(Page<SubjectVo> subjectVoPage);

    boolean insertUserInfo(SubjectDto dto);

    boolean updateUserInfo(SubjectDto dto);

    int deleteUserInfo(Long id);

    Page<SubjectVo> FuzzyUserInfoByRoleIdAndUserName(String subject, String role,Page<SubjectVo> subjectVoPage);

}
